#import <UIKit/UIKit.h>

@protocol IdImagePoolDelegate;


@interface IdImagePool : NSObject {
	id<IdImagePoolDelegate> delegate;
	NSMutableDictionary * idIconImages;
	NSMutableArray * idDownloadQueue;
};

@property (nonatomic,assign) id delegate;
@property (nonatomic,retain) NSMutableDictionary * idIconImages;
@property (nonatomic,retain) NSMutableArray * idDownloadQueue;

+ (IdImagePool *) sharedInstance;
- (id)initFromFile:(NSString *)strFilename delegate:(id<IdImagePoolDelegate>)aDelegate;
- (UIImage *)getIdImage: (NSString *)idImageUrl;
- (void)startDownload;
- (void)doDownload;

- (void)pushDownloadQueue:(NSString *)idImageUrl;
- (void)UpdateIdIcon;

@end

@protocol IdImagePoolDelegate<NSObject>
- (void)downImageFinish:(NSString *)theIdImageName;
@end
